package com.minimalist.lindi.service;

import com.minimalist.common.config.mybatis.bo.PageResp;
import com.minimalist.common.entity.lindi.po.LindiTradeApplicationContract;
import com.minimalist.common.entity.lindi.vo.contracttemplate.LindiContractTemplateVO;
import com.minimalist.common.entity.lindi.vo.tradeapplicationcontract.LindiTradeApplicationContractQueryVO;
import com.minimalist.common.entity.lindi.vo.tradeapplicationcontract.LindiTradeApplicationContractVO;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 林地指标交易平台_交易申请合同表 服务层。
 *
 * @author 11987
 * @since 2025-06-03
 */
public interface LindiTradeApplicationContractService extends IService<LindiTradeApplicationContract>{

    /**
     * 添加交易申请合同
     *
     * @param tradeApplicationContractVO 交易申请合同VO
     */
    void addTradeApplicationContract(LindiTradeApplicationContractVO tradeApplicationContractVO);

    /**
     * 根据ID删除交易申请合同
     *
     * @param tradeApplicationContractId 交易申请合同ID
     */
    void deleteTradeApplicationContractByTradeApplicationContractId(Long tradeApplicationContractId);

    /**
     * 根据ID更新交易申请合同
     *
     * @param tradeApplicationContractVO 交易申请合同VO
     */
    void updateTradeApplicationContractByTradeApplicationContractId(LindiTradeApplicationContractVO tradeApplicationContractVO);

    /**
     * 分页查询交易申请合同列表
     *
     * @param queryVO 查询条件
     * @return 分页结果
     */
    PageResp<LindiTradeApplicationContractVO> getPageTradeApplicationContractList(LindiTradeApplicationContractQueryVO queryVO);

    /**
     * 根据ID查询交易申请合同
     *
     * @param tradeApplicationContractId 交易申请合同ID
     * @return 交易申请合同VO
     */
    LindiTradeApplicationContractVO getTradeApplicationContractByTradeApplicationContractId(Long tradeApplicationContractId);

    /**
     * 根据ID查询交易申请合同列表
     *
     * @param tradeApplicationContractId 交易申请合同ID
     * @return 交易申请合同列表
     */
    List<LindiTradeApplicationContract> getTradeApplicationContractListByTradeApplicationContractId(Long tradeApplicationContractId);

    /**
     * 根据交易申请ID查询交易申请合同列表
     *
     * @param tradeApplicationId 交易申请ID
     * @return 交易申请合同列表
     */
    List<LindiTradeApplicationContractVO> getTradeApplicationContractListByTradeApplicationId(Long tradeApplicationId);

    /**
     * 获取合同模板列表
     *
     * @return List<LindiContractTemplateVO>
     */
    List<LindiContractTemplateVO> getContractTemplateList();

    /**
     * 生成合同
     *
     * @param tradeApplicationId 交易申请ID
     * @param contractTemplateId 合同模板ID
     * @param createId           创建人ID
     * @param tenantId           租户ID
     * @return 合同VO
     */
    LindiTradeApplicationContractVO generateContract(Long tradeApplicationId
            , Long contractTemplateId, Long createId, Long tenantId);
}
